package com.project.frame.common.exception;

/**
 * desc
 *
 * @author lw007
 * @date 2021/12/22
 */
public enum CommonResponseCode {
    success(0, "成功"),
    fail(1,"操作失败!"),
    token(110, "token异常!"),
    tokenInvalid(111, "无效的token!"),
    tokenExpired(112, "token已过期!"),
    tokenMissing(113, "token不能为空!"),
    IllegalArgument(200, "非法参数!"),
    paramNotExist(201, "参数不存在!"),
    delNotExist(210, "删除信息不存在!"),
    dataExist(211, "数据已存在!"),
    dataNotExist(212, "查找的数据不存在!");

    private Integer code;
    private String name;

    private CommonResponseCode(Integer code,String name) {
        this.code = code;
        this.name = name;
    }
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }
    /**
     * @return the code
     */
    public Integer getCode() {
        return code;
    }

}
